<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.test.entity.UserInfo"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>人个信息</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<%
	UserInfo userInfo = (UserInfo) session.getAttribute("userInfo");
%>

<script>
 
 function into(){
 	var pq="<%=userInfo.getPassQuestion()%>";
		var _pq = document.getElementById("cmbsocialPosition");
		for ( var i = 0; i < _pq.options.length; i++) {
			if (_pq.options[i].value == pq) {
				_pq.options[i].selected = "selected";
				break;
			}
		}
	}
	window.onload = into;
</script>

</head>
<body>
	<form action="update!update.action" method="post">
		<div class="page">
			<div class="welcome wuser2">用户信息管理</div>
			<table width="200" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td class="updateCell">用户名</td>
					<td class="updateCell"><input name="userInfo.userId"
						type="text" class="inp" id="username"
						value="<%=userInfo.getUserId()%>" />
					</td>
					<td class="updateCell"></td>
				</tr>
				<tr>
					<td class="updateCell">密码</td>
					<td class="updateCell"><input name="userInfo.passWord"
						type="text" class="inp" id="password"
						value="<%=userInfo.getPassWord()%>" />
					</td>
					<td class="updateCell">&nbsp;</td>

				</tr>
				<tr>
					<td class="updateCell">真实姓名</td>
					<td class="updateCell"><input name="userInfo.userName"
						type="text" class="inp" id="realName"
						value="<%=userInfo.getUserName()%>" />
					</td>
					<td class="updateCell">&nbsp;</td>

				</tr>
				<tr>
					<td class="updateCell">性别</td>
					<td class="updateCell"><input name="userInfo.gender"
						type="radio" class="sexinp" id="sex" value="0"
						<%if (userInfo.getGender() == 0) {%> checked="checked" <%}%> />女 <input
						name="userInfo.gender" type="radio" class="sexinp" id="sex"
						value="1" <%if (userInfo.getGender() == 1) {%> checked="checked"
						<%}%> />男</td>
					<td class="updateCell">&nbsp;</td>
				</tr>
				<tr>
					<td class="updateCell">EMAIL地址</td>
					<td class="updateCell"><input name="userInfo.address"
						type="text" class="inp" id="mail"
						value="<%=userInfo.getAddress()%>" />
					</td>
					<td class="updateCell">&nbsp;</td>
				</tr>
				<tr>
					<td class="updateCell">电话号码</td>
					<td class="updateCell"><input name="userInfo.telNo"
						type="text" class="inp" id="telephone"
						value="<%=userInfo.getTelNo()%>" />
					</td>
					<td class="updateCell">&nbsp;</td>
				</tr>
				<tr>
					<td class="updateCell">密码提问</td>
					<td class="updateCell"><select name="userInfo.passQuestion"
						id="cmbsocialPosition" style="width:200px;height:22px;">
							<option value="你的父亲的名字？">你的父亲的名字？</option>
							<option value="你的母亲的名字？">你的母亲的名字？</option>
							<option value="你的女友的名字？">你的女友的名字？</option>
					</select>
					</td>
					<td class="updateCell">&nbsp;</td>
				</tr>
				<tr>
					<td class="updateCell">问题答案</td>
					<td class="updateCell"><input name="userInfo.passAnswer"
						type="text" class="inp" id="telephone"
						value="<%=userInfo.getPassAnswer()%>" />
					</td>
					<td class="updateCell">&nbsp;</td>
				</tr>
				<tr>
					<td class="updateCell">&nbsp;</td>
					<td class="updateCell"><input type="submit" class="btn"
						value="修改信息" />
					</td>
					<td class="updateCell">&nbsp;</td>
				</tr>
			</table>

		</div>
	</form>
</body>
</html>
